package com.shiwu.server.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 作者：LCG
 * 创建时间：2019/4/2 10:24
 * 描述：
 */
@RestController
public class ServerController {

    @Autowired
    private ServerService serverService;

    @RequestMapping("/updateKucun")
    public int updateKucun(@RequestBody Map<String,Object> map) {

        int i = serverService.updateKucun ( map );

        if(map.get ( "out" )!=null){
            try {
                Thread.sleep ( 10000 );
            } catch (InterruptedException e) {
                e.printStackTrace ();
            }
        }

        return i;

    }

}
